//
//  NSString+SCBaseExt.m
//  SCFoundationKit
//
//  Created by Chao Sheng on 2023/10/17.
//

#import "NSString+SCBaseExt.h"

@implementation NSString (SCBaseExt)

- (NSAttributedString *)sc_stringWithAttributes:(NSDictionary *)attributes scope:(NSString *)scope {
    
    NSRange range = [self rangeOfString:scope];
    NSMutableAttributedString *muattr = [[NSMutableAttributedString alloc] initWithString:self];
    [muattr addAttributes:attributes range:range];
    
    return muattr;
}

- (NSAttributedString *)sc_stringWithAttributes:(NSDictionary *)attributes range:(NSRange)range {
    NSMutableAttributedString *muattr = [[NSMutableAttributedString alloc] initWithString:self];
    [muattr addAttributes:attributes range:range];
    
    return muattr;
}

@end
